# Contributor: Galen Abell <galen@galenabell.com>
# Maintainer: Galen Abell <galen@galenabell.com>
pkgname=cdrdao
pkgver=1.2.5
pkgrel=2
pkgdesc="record audio/data CD-Rs in disk-at-once mode"
url="https://cdrdao.sourceforge.net/index.html"
arch="all"
license="GPL-2.0-only"
makedepends="lame libmad libvorbis libao linux-headers"
subpackages="$pkgname-doc"
source="https://downloads.sourceforge.net/cdrdao/cdrdao-$pkgver.tar.bz2
	fix-uninit.patch
	"

prepare() {
	default_prepare
	update_config_sub
}

build() {
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--localstatedir=/var \
		--with-lame \
		--with-ogg-support \
		--with-mp3-support
	make
}

check() {
	make check
}

package() {
	make DESTDIR="$pkgdir" install
}

sha512sums="
9b07de7849d23824ad2db5d8fdf93717b73ff386105f380cd31e626e3c02c768799cb1c7d9f4955015aab241f8cf9fb23e03980c9fa82126f64ef222346bb4ce  cdrdao-1.2.5.tar.bz2
1b870e1846567c8bfd1ec3a151ce7b4c06df8cdfd8ec3451e0713995c61a5b83f0ef62f9644b8f6b28c2d43999ff248625ed3db97f2eb4067337af1ad491bba4  fix-uninit.patch
"
